package com.itlong.cloud.enumerate;

/**
 * <desc>
 *      运营财务续费管理操作菜单枚举类
 * </desc>
 * @createDate  2019/11/27
 */
public enum OperateRenewManageOperationFunctionEnum {

    FUNCTION_COMMIT(1,"提交"),
    FUNCTION_WITHDRAW(2,"撤回"),
    FUNCTION_ACCEPT(3,"审核"),
    FUNCTION_UNDO(4,"回退"),
    FUNCTION_ABANDON(5,"弃审"),
    FUNCTION_UNKNOWN(-1,"未知类型");
    private Integer type;
    private String description;

    OperateRenewManageOperationFunctionEnum(Integer type, String description){
        this.type = type;
        this.description = description;
    }

    /**
     * <desc>
     *      获取枚举类型
     * </desc>
     * @createDate  2019/11/27
     */
    public Integer getType(){
        return this.type;
    }

    /**
     * <desc>
     *      获取枚举描述
     * </desc>
     * @createDate  2019/11/27
     */
    public String getDescription(){
        return this.description;
    }

    public static OperateRenewManageOperationFunctionEnum getByType(Integer operationType){
        if(operationType != null){
            for(OperateRenewManageOperationFunctionEnum value : values()){
                if(value.getType() == operationType){
                    return value;
                }
            }
        }
        return FUNCTION_UNKNOWN;
    }
}
